package com.example.demo.services.ServerImpl;

import com.example.demo.domain.User;
import com.example.demo.domain.UserRepository;
import com.example.demo.services.UserServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class UserServerImpl implements UserServer {
    @Autowired
    UserRepository userRepository;
    @Override
    public List<User> retrunList() {
        return userRepository.findAll();
    }
    @Override
    public List<Map<String, String>> getListName() {
        return userRepository.getUserName();
    }
}
